import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter/material.dart';
class ScreenAdaper{
  static init(context){
    //屏幕适配
    ScreenUtil.init(
        BoxConstraints(
            maxWidth: MediaQuery.of(context).size.width,
            maxHeight: MediaQuery.of(context).size.height),
        designSize: Size(750, 1334),//2倍图尺寸
        orientation: Orientation.portrait
    );//初始化屏幕适配控件
  }
  // 宽度
  static width(double value){
    return ScreenUtil().setWidth(value);
  }

  // 高度
  static height(double value){
    return ScreenUtil().setHeight(value);
  }
  // 屏幕宽
  static screenWidth(){
    return ScreenUtil().screenWidth;
  }
  // 屏幕高
  static screenHieght(){
    return ScreenUtil().screenHeight;
  }



}